Problem: Forty slips are placed into a hat, each bearing a number 1, 2, 3, 4, 5, 6, 7, 8, 9, or 10, with each number entered on four slips. Four slips are drawn from the hat at random and without replacement. Let $p$ be the probability that all four slips bear the same number. Let $q$ be the probability that two of the slips bear a number $a$ and the other two bear a number $b\ne a$. What is the value of $q/p$?
The total number of ways that the numbers can be chosen is $
\binom{40}{4}.
$ Exactly 10 of these possibilities result in the four slips having the same number.

Now we need to determine the number of ways that two slips can have a number $a$ and the other two slips have a number $b$, with $b\ne a$. There are $\binom{10}{2}$ ways to choose the distinct numbers $a$ and $b$. For each value of $a$, there are $\binom{4}{2}$ ways to choose the two slips with $a$ and for  each value of $b$, there are $\binom{4}{2}$ ways to choose the two slips with $b$. Hence the number of ways that two slips have some  number $a$ and the other two slips have some distinct number $b$ is \[
\binom{10}{2}\cdot\binom{4}{2}\cdot\binom{4}{2}=45\cdot 6\cdot6 =1620.
\]So the probabilities $p$ and $q$ are $\displaystyle \frac{10}{\binom{40}{4}}$ and $\displaystyle \frac{1620}{\binom{40}{4}}$,   respectively, which implies that \[
\frac{q}{p} = \frac{1620}{10} = \boxed{162}.
\]